<template>
  <div class="monitoringEarlyWarning-root runningAnalysis-root">
    <div class="box">
      <trend :alarmTypeOptions="alarmTypeOptions"/>
    </div>
    <div class="box">
      <alarmAmount :alarmTypeOptions="alarmTypeOptions"/>
    </div>
    <div class="box">
      <alarmType :alarmTypeOptions="alarmTypeOptions"/>
    </div>
    <div class="box">
      <alarmLevel :alarmTypeOptions="alarmTypeOptions"/>
    </div>
  </div>
</template>

<script>
import trend from './components/trend.vue';
import alarmAmount from './components/alarmAmount.vue';
import alarmType from './components/alarmTypes.vue';
import alarmLevel from './components/alarmLevel.vue';

export default {
  name: "monitoringEarlyWarning",
  components: {
    trend,alarmAmount,alarmType,alarmLevel,
  },
  data() {
    return {
      alarmTypeOptions:[]
    };
  },
  methods: {},
  created(){
    this.alarmTypeOptions = []
    this.$commonJs.filterDataDict("alarmBclassify",this.alarmTypeOptions)
    this.alarmTypeOptions.splice(0,0,{label:"全部类型",value:"",name:""})
    let temp = this.alarmTypeOptions.filter(t=>t.label!='其它')
    temp.forEach(t=>{
      t.value = t.name
    })
    this.alarmTypeOptions = temp
  }
};
</script>

<style lang="scss" scoped>
.monitoringEarlyWarning-root {
  display: flex;
  flex-wrap: wrap;
  background-color: white;
  .box{
    width: 50%;
    padding: 8px 12px;
    margin-bottom: 20px;
  }
}
::v-deep .formTitle-root{
  margin-bottom: 10px;
}
</style>
